import csv

# 读取 CSV 文件
with open('csv/data.csv', mode='r', encoding='utf-8') as file:
    reader = csv.reader(file)
    for row in reader:
        print(row)

# 写入 CSV 文件
with open('csv/output.csv', mode='w', encoding='utf-8', newline='') as file:
    writer = csv.writer(file)
    writer.writerow(['姓名', '年龄', '城市'])
    writer.writerow(['张三', 23, '北京'])